/*

Author   : chaos

FileName : vir_destructor.cpp

Date     : 15/08/17 15:04:41

*/
#include <iostream>
using namespace std;

class Base
{
    public:
        Base(){cout << "Base's constructor is called !" << endl;}
        virtual ~Base()
        {cout << "Base's destructor is called!" << endl;}
};


class Derived:public Base
{
    public:
        Derived() {cout << "Derived's constructor is called!" << endl;}
        ~Derived(){cout << "Derived's destructor is called!" << endl;}
};

int main(int argc ,char *argv[])
{
    Base * A_Base  = new Derived;
    delete A_Base;
    return 0;
}
